package com.thermal.thermal_inspection.config;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfig {

    @Bean
    public RequestInterceptor internalRequestInterceptor() {
        return template -> {
            // 所有 Feign 请求自动添加内部调用标识
            template.header("X-Internal-Caller", "feign-client");
        };
    }
}